package com.zg.ktcomwan.repository

import com.zg.ktcomwan.base.BaseRepository
import com.zg.ktcomwan.data.BaseListResp
import com.zg.ktcomwan.data.BaseResp
import com.zg.ktcomwan.data.RetrofitUtils
import com.zg.ktcomwan.model.ArticleBean

/***
 * @Author:      zxd
 * @CreateDate:  2021/6/3 14:19
 * @Description:
 */
class ArticleRepositroty : BaseRepository() {
    suspend fun getArticleList(page: Int): BaseResp<BaseListResp<ArticleBean>> {
        return apiCall(suspend { RetrofitUtils.service.getHomeArticleList1(page) })
    }

    suspend fun getArticleList(
        startIndex: Int,
        endIndex: Int
    ): BaseResp<BaseListResp<ArticleBean>> {
        return RetrofitUtils.service.getHomeArticleList()
    }
}